/**
 * This file is part of 1genia trampoline
 * Copyright (C) 2007 1genia (contact@1genia.com)
 *
 * This library is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as
 * published by the Free Software Foundation; version 3 of the License. 
 *
 * This library is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details. 
 *
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; see the file COPYING.TXT.  If not,
 * write to the Free Software Foundation, Inc., 51 Franklin Street,
 * Fifth Floor, Boston, MA 02110-1301, USA. 
 **/
package com.genia.toolbox.projects.tests.uml2model_test.business.dao;

import java.util.List;

import com.genia.toolbox.model.exemple.AssociateOfB;
import com.genia.toolbox.model.exemple.impl.AssociateOfBImpl;
import com.genia.toolbox.persistence.exception.AggregateException;
import com.genia.toolbox.persistence.exception.PersistenceException;

/**
 * this interface is the business dao test of the association of <code>B</code>.
 */
public interface AssociateOfBbusinessDao
{
  /**
   * create a new instance of <code>AssociateOfB</code>.
   * 
   * @return a new instance of <code>AssociateOfB</code>.
   */
  public abstract AssociateOfBImpl createNewAssociateOfB();



  /**
   * save an object <code>AssociateOfB</code>.
   * 
   * @param associateOfB
   *          of type <code>AssociateOfB</code>.
   * @return the identifier after saving the object.
   * @throws PersistenceException
   *           occurs during persistence process.
   */
  public abstract Long saveAssociateOfB(AssociateOfB associateOfB)
      throws PersistenceException;



  /**
   * get an associate from his identifier.
   * 
   * @param identifier
   *          identifier associated to <code>AssociateOfB</code>
   * @return get an associate from his identifier.
   */
  public abstract AssociateOfB getAssociate(Long identifier);



  /**
   * a list of <code>AssociateOfB</code>.
   * 
   * @return a list of <code>AssociateOfB</code>.
   * @throws PersistenceException
   *           occurs during persistence process.
   */
  public abstract List<AssociateOfBImpl> getListAssociateOfB()
      throws PersistenceException;



  /**
   * get an associate of type <code>AssociateOfB</code> from his name.
   * 
   * @param name
   *          the name associate to <code>AssociateOfB</code>.
   * @return an associate of type <code>AssociateOfB</code> from his name.
   * @throws AggregateException
   *           is throw when an already persistant object is saved.
   * @throws PersistenceException
   *           occurs during persistence process.
   */
  public abstract AssociateOfB getAssociate(String name)
      throws AggregateException, PersistenceException;



  /**
   * delete an object <code>AssociateOfB</code> from his identifier.
   * 
   * @param identifier
   *          the identifier of <code>AssociateOfB</code>
   * @throws PersistenceException
   *           occurs during persistence process.
   */
  public abstract void delete(Long identifier)
      throws PersistenceException;
}
